<template>
    <div id="Hand">
        <v-detail :detailData="inputData" :inputConfig="inputConfig" :rules="rules" ref="detail"></v-detail>
    </div>
</template>

<script>
import detail from "commons/Detail";
import baseMixin from "@/mixins/BaseMixin";

export default {
    name: "Hand",
    mixins: [baseMixin],
    props: {
        inputData: {
            type: Object
        }
    },
    data() {
        return {
            addflag: true,
            rules: {},
        }
    },
    computed: {
        inputConfig() {
            return [
                [
                    {
                        type: "select",
                        label: this.$t('config.ccdiscrepancyrule'),
                        props: "ccdiscrepancyrule",
                        options: this.getOptions('queryCcadjrulesDropDown'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.ccadjbyrf'),
                        props: "ccadjbyrf",
                        options: this.getOptions('querycodeLkup/RFCCADJ'),
                        disabled: this.addflag
                    },
                    {
                        type: "checkbox",
                        label: this.$t('config.ccskuxloc'),
                        props: "ccskuxloc",
                        disabled: this.addflag
                    },
                    {
                        type: "checkbox",
                        label: this.$t('config.ccskuxloc'),
                        props: "piskuxloc",
                        disabled: this.addflag
                    },

                ],
                [
                    {
                        type: "input",
                        label: this.$t('config.spsaccountnum'),
                        props: "spsaccountnum",
                        disabled: this.addflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.spscostcenter'),
                        props: "spscostcenter",
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.spsreturnlabel'),
                        props: "spsreturnlabel",
                        options: this.getOptions('querycodeLkup/YESNO'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.spsuomdimension'),
                        props: "spsuomdimension",
                        options: this.getOptions('querycodeLkup/SPSUOMDIM'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.spsuomweight'),
                        props: "spsuomweight",
                        options: this.getOptions('querycodeLkup/SPSUOMWGT'),
                        disabled: this.addflag
                    },
                ],
                [
                    {
                        type: "select",
                        label: this.$t('config.allowcommingledlpn'),
                        props: "allowcommingledlpn",
                        options: this.getOptions('querycodeLkup/YESNO'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.autocloseasn'),
                        props: "autocloseasn",
                        options: this.getOptions('querycodeLkup/YESNO'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.autoclosepo'),
                        props: "autoclosepo",
                        options: this.getOptions('querycodeLkup/YESNO'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.allowsystemgeneratedlpn'),
                        props: "allowsystemgeneratedlpn",
                        options: this.getOptions('querycodeLkup/YESNO'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.allowsinglescanreceiving'),
                        props: "allowsinglescanreceiving",
                        options: this.getOptions('querycodeLkup/YESNO'),
                        disabled: this.addflag
                    },
                ],
                [
                    {
                        type: "select",
                        label: this.$t('config.receiptvalidationtemplate'),
                        props: "receiptvalidationtemplate",
                        options: this.getOptions('queryReceiptvalidationDropDown'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.barcodeconfigkey'),
                        props: "barcodeconfigkey",
                        options: this.getOptions('queryBarcodeconfigDropDown'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.trackinventoryby'),
                        props: "trackinventoryby",
                        options: this.getOptions('querycodeLkup/TRACKINV'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.dupcaseid'),
                        props: "dupcaseid",
                        options: this.getOptions('querycodeLkup/DUPCASE'),
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.registonesance'),
                        props: "registonesance",
                        options: this.getOptions('querycodeLkup/YESNO'),
                        disabled: this.addflag
                    },
                ],
                [
                    {
                        type: "input",
                        label: this.$t('config.ownerprefix'),
                        props: "ownerprefix",
                        disabled: this.addflag
                    },
                    {
                        type: "select",
                        label: this.$t('config.explodelpnlength'),
                        props: "explodelpnlength",
                        options: this.getOptions('querycodeLkup/IDLENGTH'),
                        disabled: this.addflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.explodelpnstartnumber'),
                        props: "explodelpnstartnumber",
                        disabled: this.addflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.explodenextlpnnumber'),
                        props: "explodenextlpnnumber",
                        disabled: this.addflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.explodelpnrollbacknumber'),
                        props: "explodelpnrollbacknumber",
                        disabled: this.addflag
                    }
                ]
            ]
        }
    },
    methods: {},
    mounted() {
        if (this.$store.state.wms.toUpperCase().includes('WMWHSE')) {
            this.addflag = false;
        }
    },
    components: {
        "v-detail": detail
    }
}
</script>

<style scoped>

</style>
